1. Field of the Invention
The present invention relates to a method, system and program for providing a mirror copy of data.
2. Description of the Related Art
Data storage systems may maintain a secondary copy of data at a remote site to use in the event of a failure at the primary site. Such dual or shadow copies are typically made as the application system is writing new data to a primary storage device. International Business Machines Corporation (IBM®), the assignee of the subject patent application, provides two systems for maintaining remote copies of data at a secondary site, extended remote copy (XRC) and peer-to-peer remote copy (PPRC). These systems provide a method for recovering data updates between a last, safe backup and a system failure. Such data shadowing systems can also provide an additional remote copy for non-recovery purposes, such as local access at a remote site. These IBM XRC and PPRC systems are described in IBM publication “Remote Copy: Administrator's Guide and Reference,” IBM document no. SC35-0169-02 (IBM Copyright 1994, 1996), which publication is incorporated herein by reference in its entirety.
In such backup systems, data is maintained in volume pairs. A volume pair is comprised of a volume in a primary storage device and a corresponding volume in a secondary storage device that includes an identical copy of the data maintained in the primary volume. Typically, the primary volume of the pair will be maintained in a primary direct access storage device (DASD) and the secondary volume of the pair is maintained in a secondary DASD shadowing the data on the primary DASD. A primary storage controller may be provided to control access to the primary storage and a secondary storage controller may be provided to control access to the secondary storage.
In prior art systems, there are generally two modes for transferring data from the primary to the secondary storage systems—asynchronous and synchronous. In asynchronous mode, the host transfers data to the primary storage and write acknowledgment is immediately returned to the host even before the data is committed on the secondary site. After receiving acknowledgment, a copy of the updates are transferred to secondary storage. Updates not yet transferred to secondary storage are maintained in a journal. With the asynchronous technique, delays at the host are minimized because the host receives immediate acknowledgment. However, the mirrored copy of the data on secondary storage is not current with the updates at the primary storage.
In synchronous mode, the host does not receive acknowledgment until the data is committed to the secondary storage and the acknowledgment is returned by the secondary storage. In this mode, the mirror copy is current because the host write is not complete until the data is transferred to the secondary site and the writes are confirmed as applied to the secondary storage in the same order as applied to the primary storage. Further, the performance in synchronous mode is substantially affected by the distance between the primary and the secondary site because performance degrades as the distance increases, i.e., the I/O rate at the host application depends on the distance between the primary and secondary sites. As the distance increases, the host application I/O processing rate significantly decreases because it takes longer for the secondary site to acknowledge the update of the data at the secondary storage site.
Accordingly, there is a need in the art for improved techniques for mirroring data between primary and secondary sites.